Creating modular and reusable DSL textual syntax definitions with Grammatic/ANTLR
نویسنده
چکیده
In this paper we present Grammatic – a tool for textual syntax definition. Grammatic serves as a front-end for parser generators (and other tools) and brings modularity and reuse to their development artifacts. It adapts techniques for separation of concerns from ApsectOriented Programming to grammars and uses templates for grammar reuse. We illustrate usage of Grammatic by describing a case study: bringing separation of concerns to ANTLR parser generator, which is achieved without a common timeand memory-consuming technique of building an AST to separate semantic actions from a grammar definition.
منابع مشابه
Simpl: a Toolkit for Rapid DSL Implementation
This paper describes the Simpl toolkit for implementing domain-specific languages (DSLs). Simpl aims to be a comprehensive toolkit that covers most of the aspects of developing a DSL. DSL implementations created with Simpl can be embedded into a larger system because no assumptions about architecture of the system are made. Simpl is based on existing tools and adds to them a grammar description...
متن کاملDSL development based on target meta-models. Using AST transformations for automating semantic analysis in a textual DSL framework
This paper describes an approach to creating textual syntax for Domain-Specific Languages (DSL). We consider target meta-model to be the main artifact and hence to be developed first. The key idea is to represent analysis of textual syntax as a sequence of transformations. This is made by explicit operations on abstract syntax trees (ATS), for which a simple language is proposed. Text-to-model ...
متن کاملGrammatic -- a tool for grammar definition reuse and modularity
Grammatic is a tool for grammar definition and manipulation aimed to improve modularity and reuse of grammars and related development artifacts. It is independent from parsing technology and any other details of target system implementation. Grammatic provides a way for annotating grammars with arbitrary metadata (associativity attributes, semantic actions or anything else). It might be used as...
متن کاملGel: A Generic Extensible Language
Both XML and Lisp have demonstrated the utility of generic syntax for expressing tree-structured data. But generic languages do not provide the syntactic richness of custom languages. Generic Expression Language (Gel) is a rich generic syntax that embodies many of the common syntactic conventions for operators, grouping and lists in widely-used languages. Prefix/infix operators are disambiguate...
متن کاملComputational Representation of Linguistic Structures using Domain-Specific Languages
We describe a modular system for generating sentences from formal definitions of underlying linguistic structures using domain-specific languages. The system uses Java in general, Prolog for lexical entries and custom domain-specific languages based on Functional Grammar and Functional Discourse Grammar notation, implemented using the ANTLR parser generator. We show how linguistic and technolog...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/0902.2621 شماره
صفحات -
تاریخ انتشار 2009